﻿using System.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using Communication;
using Database;

namespace WCFService
{
    interface NewLogicForumInterface
    {
        //interface
        //if there is anyproblem its return null if its object
        //or false if its boolean
        //or -1 if its int 
        //or empty string ("") if its string
        //============================================================================ back
         Thread BackFromPost(User user, int forumid, int subforumid, int Threadid);

         SubForum BackFromThread(User user, int forumid, int subforumid);

         Forum BackFromSubForum(User user, int forumid);

         //==========================================================================register after you register u need to do login
         Boolean Register(int forumid, string username, string firstname, string lastname, string password, string email);

        //======================================================================================edit post or thread

         int EditPost(User user, int forumid, int postid, string title, string body);

         int EditThread(User user, int forumid, int threadid, string title, string body);

         //========================================================================add stuff return true if done , 

         int AddSubForum(User user, int forumid, string title, string moderator);

         int AddThread(User user, int forumid, string title, string body);

         int AddPost(User user, int forumid, string title, string body);

         Boolean AddNewModeratorToSubForum(User user, int forumid, int subforumid, string moderetoruserName);

         //==================================================================remove stuff , return true if done assignment 2 function

         Boolean RemoveSubForum(User user, int forumid, int subforumid);

         Boolean RemoveThread(User clientuser, int forumid, int threadposition);

         Boolean RemoveModerator(User user, int forumid, int subforumid, string moderatoruserName);

         Boolean ChangeTheSubForumModerator(User user, int forumid, int subforumid, string UserNametoRemove, string UserNametoAdd);

         //========================================================================function to the manager

         int SubForumMsgCount(User user, int forumid, int subforumid);

         int MemberMsgCount(User user, int forumid, string userName);

         string getAllMemberRespondToAllThreads(User user, int forumid, int subforumid);

         //========================================================================function to the director

         int getNumberOfForum(User user);

         int getNumberOfCommonUsers(User user);

         string getstringCountsubForumMsg(User user, int forumid, int subforumid);

         string getstringCountMemberMsg(User user, int forumid, string userName);

         

         //========================================================================get function

         Forum getForum(User user, int forumid);

         SubForum getSubForum(User user, int forumid, int subforumid);

         Thread getThread(User user, int forumid, int threadid, int subForumId = 0);

         Post getPost(User user, int forumid, int subforumid, int threadid, int postid);

         List<string> getUserList(User user);

         SortedDictionary<int, Forum> getAllForumsData(User user);

         Boolean setForumName(User user, int forumid, string newforumname);
         
         string getForumName(User user, int forumid);

         Boolean IsRegister(User user, int forumid);

         Boolean islogin(User user, int forumid);

         Boolean logout(User user, int forumid);

         Boolean login(User user, int forumid);

         Boolean login(int forumid, string username, string password);
    }
}
